//    1:物资结算 2:供方加付款结算
import service from '@/utils/request'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service
const request = {
    //获取table页面列表
    getpaymentList (params) {
        return httpPost({
            url: '/materialsettle/supplierPlusDeductionSettlement/listByEntity',
            params
        })
    },
    //根据id获取查询查询供方加扣款结算基本信息
    getSettlemen (params) {
        return httpGet({
            url: '/materialsettle/supplierPlusDeductionSettlement/findById',
            params
        })
    },
    //根据供方加扣款结算id获取加扣款明细
    getjkkmxbyId (params) {
        return httpGet({
            url: '/materialsettle/supplierPlusDeductionSettlement/getListById',
            params
        })
    },
    //根据供方加扣款结算id获取物资明细
    getwzmxbyId (params) {
        return httpGet({
            url: '/materialsettle/supplierPlusDeductionSettlement/getMaterialListById',
            params
        })

    },
    // //根据供方加扣款结算id获取返还保证金明细
    // getbzjbyId (params) {
    //     return httpGet({
    //         url: '/materialsettle/supplierPlusDeductionSettlement/getReturnDepositDtlListById',
    //         params
    //     })
    // },
    //获取加扣款明细
    getjqkList () {
        return httpPost({
            // /materialsettle/common/getPlusDeductionList
            url: '/materialsettle/common/getPlusDeductionList'
        })
    },
    //获取选择合同列表(结算单位)
    getjsdwlist () {
        return httpGet({
            url: '/subcontract/thirdParty/getForMaterialAcceptance'
        })
    },
    //点击保存接口 先保存的是第一页
    onsave (params) {
        return httpPost({
            url: '/materialsettle/supplierPlusDeductionSettlement/create',
            params
        })
    },
    //点击保存接口 2：保存加扣款明细
    onsavejjk (params) {
        return httpPost({
            url: '/materialsettle/supplierPlusDeductionSettlement/updateList',
            params
        })
    },
    //根据供方加扣款结算id获取加扣款明细
    getjkkbyId (params) {
        return httpGet({
            url: '/materialsettle/supplierPlusDeductionSettlement/getListById',
            params
        })
    },
    //点击保存接口 3:保存物资汇总
    onsavewzhz (params) {
        return httpPost({
            url: '/materialsettle/supplierPlusDeductionSettlement/updateMaterialList',
            params
        })
    },
    //根据供方加扣款结算id获取物资汇总
    getwzhzbyId (params) {
        return httpGet({
            url: '/materialsettle/supplierPlusDeductionSettlement/getMaterialListById',
            params
        })
    },
    //点击保存 4:保存返还保证金
    onsavebzj (params) {
        return httpPost({
            url: '/materialsettle/supplierPlusDeductionSettlement/updateReturnDepositDtlList',
            params
        })
    },
    //根据供方加扣款结算id获取返还保证金
    getbzjbyId (params) {
        return httpGet({
            url: '/materialsettle/supplierPlusDeductionSettlement/getReturnDepositDtlListById',
            params
        })
    },
    //修改供方加扣款结算
    update (params) {
        return httpPost({
            url: '/materialsettle/supplierPlusDeductionSettlement/update',
            params
        })
    },
    //根据id删除加扣款结算
    deljkkbyid (params) {
        return httpGet({
            url: '/materialsettle/supplierPlusDeductionSettlement/delete',
            params
        })
    },
    //弹窗 ↓
    //合同弹窗
    getjcht (params) {
        return httpPost({
            url: '/subcontract/thirdParty/getSupplierSettlement',
            params
        })
    },
    //物资明细弹窗
    getwzmx (params) {
        return httpGet({
            url: '/subcontract/thirdParty/getSupplierList',
            params
        })
    },
    //保证金弹窗
    getbzj (params) {
        return httpGet({
            url: '/subcontract/thirdParty/getSupplierBond',
            params
        })
    },
    bzjdemo (params) {
        return httpPost({
            url: '/materialsettle/purchaseSettlement/listUnreturnAmountForSelect',
            params
        })
    }
}

export default request
